package com.trsj.lnsj.common;

public class DataResponse extends CustomResponse {
  private static final long serialVersionUID = 1L;
  private Object data;

  public DataResponse(int msgCode) {
    super(msgCode);
    if(data==null) {
    	data=new String("");
    }
  }

  public DataResponse(int msgCode, Object data) {
    super(msgCode);
    if (data!=null)
    this.data = data;
    else
    data=new String("");
  }

  public Object getData() {
    return data;
  }

  public void setData(Object data) {
    this.data = data;
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((data == null) ? 0 : data.hashCode());
    return result;
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }
    if (!(obj instanceof DataResponse)) {
      return false;
    }
    DataResponse other = (DataResponse) obj;
    if (data == null) {
      if (other.data != null) {
        return false;
      }
    } else if (!data.equals(other.data)) {
      return false;
    }
    return true;
  }

}
